package com.chem.lems.entity;

import lombok.Data;

import javax.persistence.*;

@Data
@Entity
@Table(name = "elms_menu")
public class Menus implements Comparable<Menus>{
    @Id
    @Column(name = "menu_id")
    private Integer menuId;

    @Column(name = "menu_name")
    private String menuName;

    @Column(name = "menu_pid")
    private int menuPid;

    @Column(name = "menu_level")
    private Integer  menuLevel;

    @Column(name = "menu_path")
    private String  menuPath;

    @Override
    public String toString() {
        return "Menus{" +
                "menuId=" + menuId +
                ", menuName='" + menuName + '\'' +
                ", menuPid=" + menuPid +
                ", menuLevel=" + menuLevel +
                ", menuPath='" + menuPath + '\'' +
                '}';
    }

    @Override
    public int compareTo(Menus o) {
        return this.menuId - o.getMenuId();
    }
}
